package com.kb.spring.jpa.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import com.kb.spring.jpa.dao.PersonPageAndSortingRepository;
import com.kb.spring.jpa.entities.Person;

@Service
public class PersonPageAndSortingService {
	@Autowired
	private PersonPageAndSortingRepository personPageAndSortingRepository;

	public Page<Person> personPageAndSortingFindAll(Pageable page) {
		Page<Person> list = personPageAndSortingRepository.findAll(page);
		return list;
	}
}
